package org.mspring.platform.dao.query.convert.impl;

import org.mspring.platform.dao.query.convert.ConversionException;
import org.mspring.platform.dao.query.convert.Converter;

/**
 * @author Gao Youbo
 * @since Jan 31, 2012
 */
public class LongConverter implements Converter {

    @Override
    public Object convert(Class<?> type, String value) throws ConversionException {
        if (org.apache.commons.lang3.StringUtils.isBlank(value)) {
            return null;
        }
        return Long.valueOf(value.trim());
    }

}
